<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/context/mytags.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <t:base type="jquery,easyui,tools,DatePicker,ckeditor"></t:base>
    <link rel="stylesheet" href="${webRoot}/plug-in/lhgDialog/skins/blue.css"/>
    <link rel="stylesheet" href="${webRoot}/plug-in/lhgDialog/skins/default.css"/>
    <script type="text/javascript" src="${webRoot}/plug-in/ajaxfileupload/ajaxfileupload.js"></script>
    <script type="text/javascript" charset="utf-8"
            src="${webRoot}/plug-in/ueditor1_4_3-utf8-jsp/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8"
            src="${webRoot}/plug-in/ueditor1_4_3-utf8-jsp/ueditor.all.min.js"></script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8"
            src="${webRoot}/plug-in/ueditor1_4_3-utf8-jsp/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript" charset="utf-8" src="${webRoot}/plug-in/QQgeo/geo.js"></script>
    <script type="text/javascript" charset="utf-8" src="${webRoot}/plug-in/My97DatePicker/WdatePicker.js"></script>
</head>

<body scroll="no">
<%--<t:formvalid formid="reviewForm" dialog="true" usePlugin="password" layout="table"--%>
<%--action="studioController.do?saveorupdate">--%>
<input name="studioId" type="hidden" value="${orderEntity.orderId}">

<div class="new_table_list">
    <table cellpadding="0" cellspacing="1" class="formtable" style="padding-left: 50px">
        <tbody>
        <tr>
            <td align="left" style="width: 100px">
                <label class="Validform_label">
                    预约人:
                </label>
            </td>
            <td class="txt_left value">
                <input class="inputxt" style="width: 200px;" name="name" value="${orderEntity.customerEntity.realname}"
                       maxlength="32"
                       datatype="*">
            </td>
            <td align="left" style="width: 100px">
                <label class="Validform_label">
                    咨询师:
                </label>
            </td>
            <td class="txt_left value">
                <input class="inputxt" style="width: 200px;" name="name" value="" maxlength="32"
                       datatype="*">
            </td>
        </tr>
        <tr>
            <td align="left" style="width: 100px">
                <label class="Validform_label">
                    咨询方式:
                </label>
            </td>
            <td class="txt_left value">
                <t:dictSelect field="zxType" typeGroupCode="zxType" defaultVal="${orderEntity.orderType}"
                              hasLabel="false" extendJson="{datatype:'*';nullmsg:''}"></t:dictSelect>
            </td>
            <td align="left" style="width: 100px">
                <label class="Validform_label">
                    订单状态:
                </label>
            </td>
            <td class="txt_left value">
                <t:dictSelect field="orderStatus" typeGroupCode="orderStatus" defaultVal="${orderEntity.orderStatus}"
                              hasLabel="false" extendJson="{datatype:'*';nullmsg:''}"></t:dictSelect>
            </td>
        </tr>
        <tr>
            <td align="left" style="width: 100px">
                <label class="Validform_label">
                    支付状态:
                </label>
            </td>
            <td class="txt_left value">
                <t:dictSelect field="payStatus" typeGroupCode="payStatus" defaultVal="${orderEntity.payStatus}"
                              hasLabel="false" extendJson="{datatype:'*';nullmsg:''}"></t:dictSelect>
            </td>
            <td align="left" style="width: 100px">
                <label class="Validform_label">
                    支付方式:
                </label>
            </td>
            <td class="txt_left value" >
                <t:dictSelect field="payType" typeGroupCode="payType" defaultVal="${orderEntity.payType}" id="payType"
                              hasLabel="false" extendJson="{nullmsg:''}"></t:dictSelect>
            </td>
        </tr>
        <tr>
            <td align="left" style="width: 100px">
                <label class="Validform_label">
                    客户姓名:
                </label>
            </td>
            <td class="txt_left value" colspan="3">
                <input class="inputxt" style="width: 200px;" name="name" value="${orderEntity.customerName}"
                       maxlength="32"
                       datatype="*">
                <span class="Validform_checktip"></span>
            </td>
        </tr>
        <tr>
            <td align="left" style="width: 100px">
                <label class="Validform_label">
                    年龄:
                </label>
            </td>
            <td class="txt_left value">
                <input class="inputxt" style="width: 200px;" name="name" value="${orderEntity.customerAge}"
                       maxlength="32"
                       datatype="*">
                <span class="Validform_checktip"></span>
            </td>
            <td align="left" style="width: 100px">
                <label class="Validform_label">
                    性别:
                </label>
            </td>
            <td class="txt_left value">
                <t:dictSelect field="sex" typeGroupCode="sex" defaultVal="${orderEntity.customerSex}"
                              hasLabel="false" extendJson="{nullmsg:''}"></t:dictSelect>
            </td>
        </tr>

        <c:if test="${orderEntity.orderType == 1}">
        <tr>
            <td align="left" style="width: 100px">
                <label class="Validform_label">
                    咨询师确认时间:
                </label>
            </td>
            <td class="txt_left value" colspan="3">
                <c:if test="${orderEntity.sureTime != null}">
                    <fmt:formatDate value="${orderEntity.sureTime}"  pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
                </c:if>
                <c:if test="${orderEntity.sureTime == null}">咨询师未确认</c:if>
            </td>
        </tr>
        </c:if>
        <c:if test="${orderEntity.orderType != 1}">
        <td align="left" style="width: 100px">
            <label class="Validform_label">
                预约时间:
            </label>
        </td>
        <td class="txt_left value" colspan="3">
            <c:set var="tsize" value="0"></c:set>
            <c:forEach items="${ordertime}" var="t">
                <fmt:formatDate value="${t.adviceTime}"  pattern="yyyy-MM-dd"></fmt:formatDate>&nbsp;
                <fmt:formatDate value="${t.startTime}"  pattern="HH:mm"></fmt:formatDate>-<fmt:formatDate value="${t.endTime}"  pattern="HH:mm"></fmt:formatDate><br/>
                <c:set var="tsize" value="${tsize+1}"></c:set>
            </c:forEach>
            <c:if test="${tsize == 0}">未选择时间，旧版遗留订单</c:if>
        </td>
        </c:if>
        <tr>
            <td align="left" style="width: 100px">
                <label class="Validform_label">
                    问题描述:
                </label>
            </td>
            <td class="txt_left value" colspan="3">
                   <textarea style="width: 670px;height: 100px;"
                             name="studioDesc"> ${studioEntity.problemDesc}</textarea>
            </td>
        </tr>
    </table>
</div>
<%--</t:formvalid>--%>
<script>
    $(function () {
        var payType = "${orderEntity.payType}";
        if(!payType)
            $("#payType").children().eq(0).html("");
    <%--//省、市、区默认数据填充--%>
    <%--setup();--%>

    <%--//初始化已经选中的值--%>
    <%--var province = '${studioEntity.province}';--%>
    <%--var city = '${studioEntity.city}';--%>
    <%--var area = '${studioEntity.area}';--%>
    <%--initSelValue(province, city, area);--%>

    <%--//初始话认证标签数据--%>
    <%--initBQ();--%>

    <%--//设定页面只可以查看，不可以编辑--%>
    $("input").attr("readonly", true);
    $("input").css("color", "#929292");

    $("textarea").attr("readonly", true);
    $("textarea").css("color", "#929292");


    $("select").attr("disabled", "disabled");
    <%--&lt;%&ndash;$("img").css("color", "#929292");&ndash;%&gt;--%>

    <%--&lt;%&ndash;var isReview = "${studioEntity.isReview}";&ndash;%&gt;--%>
    <%--&lt;%&ndash;$("#reviewStatus").val(isReview);&ndash;%&gt;--%>
    <%--&lt;%&ndash;$("#reviewStatus").css("color", "#929292");&ndash;%&gt;--%>
    <%--$("select").attr("disabled", "disabled");--%>
    });


    <%--function initBQ() {--%>
    <%--var authTag =","+ $("#authTag").val()+",";--%>
    <%--//var a = authTag.split(",");--%>
    <%--$.post("studioController.do?ts_typeList", {}, function (data) {--%>
    <%--var h = "";--%>
    <%--for (var i = 0; i < data.length; i++) {--%>
    <%--var typecode = data[i]['typecode'];--%>
    <%--var typename = data[i]['typename'];--%>
    <%--if(authTag.indexOf(","+typecode+",")>-1){--%>
    <%--var obj = '<label><input class="bq" name="chk" id="tag' + typecode + '" type="checkbox" onclick="boxChecked()" value="' + typecode + '" checked="checked" disabled="disabled"/>' + typename + ' </label>';--%>
    <%--}else{--%>
    <%--var obj = '<label><input class="bq" name="chk" id="tag' + typecode + '" type="checkbox" onclick="boxChecked()" value="' + typecode + '" disabled="disabled"/>' + typename + ' </label>';--%>
    <%--}--%>
    <%--h += obj;--%>
    <%--}--%>
    <%--$("#showCheckBox").append(h);--%>
    <%--}, "json");--%>
    <%--}--%>

    <%--function boxChecked() {--%>
    <%--var bq = "";--%>
    <%--var objs = $('input[name="chk"]');--%>
    <%--for (var i = 0; i < objs.length; i++) {--%>
    <%--var obj = objs.eq(i);--%>
    <%--if (obj.prop("checked")) {--%>
    <%--bq += (obj.val() + ",");--%>
    <%--}--%>
    <%--}--%>
    <%--$("#authTag").val(bq);--%>

    <%--}--%>

    <%--/**--%>
    <%--* 添加标签--%>
    <%--* @param second_classes--%>
    <%--*/--%>
    <%--function add_second_classes(second_classes) {--%>
    <%--var title = "添加标签";--%>
    <%--var url = "consultantController.do?secondClasses&ids=" + second_classes + "&upiframename=" + window.name;--%>
    <%--createwindow(title, url, 580, 530);--%>
    <%--}--%>

    <%--/**--%>
    <%--* 分类回调--%>
    <%--*/--%>
    <%--function classes_callback(fname, ids, tags) {--%>
    <%--$("iframe[name=" + fname + "]", this.parent.parent.document)[0].contentWindow.f_closeWindow();--%>
    <%--$("#secondClasses").val(ids);--%>
    <%--$("#secondClassesTag").html(tags);--%>
    <%--}--%>
</script>
</body>

</html>